package ThirdQuestion;

/**
 * @author cyt
 * @date 2020/6/9
 */
public class test {
    public static void main(String[] args) {
        MobileCard mobileCard = new MobileCard(CardType.BIG,10086, "小美", "111",10,20,20);
        System.out.println("小美去办了一张新卡");
        mobileCard.show();

        Package p1 = new CallPackage(20,10,20);
        System.out.println("她又办了通话套餐");
        p1.showAllInfo();

        Package p2 = new OnlinePackage(10,10);
        System.out.println("她也办了上网套餐");
        p2.showAllInfo();

        System.out.println("小美打了一通电话");
        ((CallService)p1).callService(5,mobileCard);

        System.out.println("小美上了一会网");
        ((OnlineService)p2).onlineService(10,mobileCard);


    }
}
